Skip to content

Every pull request of a multi-repository run gets its own CI fix rounds - #980

Merged
coderhelm[bot] merged 2 commits into
mainfrom
multi-repo-ci-rounds
Dec 5, 2026
Merged

coderhelm[bot] merged 2 commits into
mainfrom
multi-repo-ci-rounds

Conversation

@nambok

@nambok nambok commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

A run that opened pull requests in several repositories read CI on each and, when any was red, finished with the pull requests open and the red ones left as they were. Each pull request of such a run now gets its own CI fix rounds, and the run ends only when every pull request is settled.

Changes

  • common::repo_ci (new): a CI ledger with one entry per pull request of the run (rounds, rounds in a row that met the same failure, stop reason, typed person-only hold). next decides the next step: a round on one red pull request, wait, done, or settled. A pull request builds on every repository the plan orders before its own: it waits while that one is red or its CI runs, and a provider whose rounds stopped never holds the rest. Pull requests with no dependency between them go independently, the one with the fewest rounds first. begin applies the single repository loop's own bound (run_round::ci_cycle_goes_on): a round followed by the same failure made no progress, and two such rounds in a row stop that pull request's rounds as CoderHelm's own problem.
  • resume_multi_repo (worker): reads every pull request's head, then runs the ledger's step. A red pull request gets the mode diagnosis first (mode_cause, mode_repair::on_red), then the CI fix round every fix takes (run_fix_round) on its branch. The round is given the failing checks, their logs, the shared fix rules (CI_FIX_RULES, now one constant for both loops) and the run's other pull requests. A parked round runs again for the pull request it belongs to. A stop records an own problem, writes what fails on that pull request, and ends the run with the typed stop (stop_red) once everything is settled. When every pull request is green, each goes through the ready decision in the plan's order and the run completes.
  • Person-only path: the old note that CoderHelm fixes CI in a single repository is gone. A person is named only when a round that changed no code found that the fix needs a GitHub permission an admin grants, typed through person_only::admit. The note then names that reason, next to every other pull request having gone green.
  • run_fix_round now saves a CI round's account so the reading after it can use it. The record's primary pull request fields are put back after a round on another pull request writes its own.
  • Incident xu_every_repo_gets_its_ci_rounds with its page.

Verification

  • cargo fmt --all --check, rustfmt --check on incidents: clean.
  • cargo clippy -p common -p worker -p gateway --all-targets -- -D warnings: clean.
  • cargo test -p common -p worker -p gateway: all pass.
  • brand_spelling.py, domain_examples.py: pass.
  • Incident cases replay the ledger as the worker drives it: a two-repository run with one red pull request is fixed and both are offered; both red, both fixed independently; a stuck one stops after the bound as CoderHelm's own problem with no person named while the other goes green; a dependent repository waits for the one it builds on; only a typed person-only reason holds a red pull request. A source check keeps resume_multi_repo wired to the ledger, the mode diagnosis, the shared round and the typed stop.

A run that opened pull requests in several repositories read CI on each
and, when any was red, finished with the pull requests open. Each pull
request now has its own entry in a CI ledger (common::repo_ci): a red
one gets the same CI fix round a single repository takes (the mode
diagnosis, then run_fix_round on its branch), rounds go on while the
failure changes and stop as CoderHelm's own problem past the bound, a
pull request that builds on another repository's waits while that one
is red or running, and the run ends only when every pull request is
settled. A person is named only for a typed person-only reason.

Incident xu_every_repo_gets_its_ci_rounds.
@nambok nambok added the ch-review CoderHelm reviews this pull request label Dec 5, 2026
coderhelm[bot]
coderhelm Bot previously requested changes Dec 5, 2026

@coderhelm coderhelm Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved with notes c20f03d (merged)

Comment thread services/worker/src/passes/resume.rs Resolved
Comment thread services/worker/src/passes/resume.rs Resolved
coderhelm[bot]

This comment was marked as outdated.

@coderhelm
coderhelm Bot dismissed their stale review December 5, 2026 09:04

Superseded by CoderHelm's latest review

@coderhelm

coderhelm Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

💚 Post-merge health check passed: the deploy of aa0167a completed and stayed green for the full 15-minute watch window (no new failures vs. the pre-merge baseline).
Auto-merge

  • ✅ CoderHelm approved
  • ✅ CI green
    The rest is in the pull request description.

@coderhelm coderhelm Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved with notes b9dac4e (merged)

@coderhelm
coderhelm Bot merged commit aa0167a into main Dec 5, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ch-review CoderHelm reviews this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant